package com.getpebble.android.framework.protocol.outbound;

import com.getpebble.android.framework.appmessage.AppLifecycleMessage;
import com.getpebble.android.framework.appmessage.AppLifecycleMessage.RunState;
import com.getpebble.android.framework.appmessage.AppMessage;
import com.getpebble.android.framework.protocol.EndpointId;
import java.util.UUID;

public class PblOutboundAppLifecycleMessage extends PblOutboundAppMessage {
    public PblOutboundAppLifecycleMessage(AppMessage appMessage) {
        super(EndpointId.APP_LIFECYCLE, appMessage);
    }

    public static PblOutboundAppLifecycleMessage createStartMessage(UUID uuid) {
        return new PblOutboundAppLifecycleMessage(new AppLifecycleMessage(uuid, RunState.RUNNING).toAppMessage());
    }

    public static PblOutboundAppLifecycleMessage createStopMessage(UUID uuid) {
        return new PblOutboundAppLifecycleMessage(new AppLifecycleMessage(uuid, RunState.NOT_RUNNING).toAppMessage());
    }

    public static PblOutboundAppLifecycleMessage createFetchMessage() {
        return new PblOutboundAppLifecycleMessage(AppLifecycleMessage.obtainFetchAppsMessage().toAppMessage());
    }
}
